#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
//杨氏矩阵
int Yang_arrary(int(*p)[3], int x, int y, int key)
{
	int i = 0;
	int j = y-1;
	while (i <=x-1 && j >= 0)
	{
		if (p[i][j] > key)
		{
			j--;
		}
		else if (p[i][j] < key)
		{
			i++;
		}
		else
		{
			return 1;
		}
	}
	return 0;
}

int main()
{
	int arr[3][3] = { {1,2,3},{4,5,6},{7,8,9} };
	int key = 0;
	scanf("%d", &key);
	int ret = Yang_arrary(arr, 3, 3,key);
	if (ret==1)
	{
		printf("找到了");
	}
	if (ret==0)
	{
		printf("找不到");
	}
	return 0;
}



//int main()
//{
//	int arr[3][3] = { {1,2,3},{4,5,6},{7,8,9} };
//	int (*p)[3] = arr;
//	printf("%d\n", (*(p + 1) + 2));
//	return 0;
//}